home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
lisp
/
elk-2_0.lha
/
elk-2.0
/
MIGRATE
< prev
next >
Wrap
Text File
|
1992-11-08
|
2KB
|
48 lines
This file lists changes in the interpreter kernel that affect the
interface to extensions to Elk.
Changes in release 2.0:
o The Elk include file "scheme.h" now is in a different directory
(include), so you have to change the -I option in your Makefiles.
o <errno.h> is no longer included by "scheme.h", so you have
to include it in your extensions if it is required.
o lib/string.h is included automatically if you include scheme.h.
o It is no longer necessary to pre-link extensions against
lib/util/objects.o or lib/util/symbol.o. The files now are in
a library (libutil.a); extensions are linked against this
library automatically when they are loaded into Elk.
o The way new Scheme objects are allocated has changed as a
side-effect of adding the necessary hooks for the generational
garbage collector (which is not yet present in Elk 2.0).
The function Get_Bytes has been replaced by the new function
Alloc_Object. Alloc_Object already returns a Scheme `Object';
there is no need to use SET any longer. The arguments are the
object's size in bytes, the type, and a flag indicating whether
the object is constant (constant objects may be placed into a
read-only portion of the memory in later versions of Elk).
So you have to replace old code to allocate an object of type
T_Foo that looked like this:
Object o; char *p;
p = Get_Bytes (sizeof (struct S_Foo));
SET(o, T_Foo, (struct S_Foo *)p);
by this:
Object o = Alloc_Object (sizeof (struct S_Foo), T_Foo, 0);
(use 1 instead of 0 if the new object is considered immutable).
o If you store weak pointers to objects and forward the pointers
explicitly in an after-GC function, you are now required to use
a set of new macros. See src/terminate.c and lib/util/objects.c
for examples.